<?php

/* Project Parasynthesis
* Author: Fujiwara Sai
* Usage: Stats Cron
*/

if(!defined('IN_DISCUZ')) {
	exit('Access Denied');
}

$data = array();
$query = $db->query("SELECT COUNT(*) FROM {$tablepre}posts");
$data['posts_total'] = $db->result($query, 0);
$query = $db->query("SELECT COUNT(*) FROM {$tablepre}plugin_now");
$data['nw_total'] = $db->result($query, 0);
$query = $db->query("SELECT COUNT(*) FROM {$tablepre}savepoint");
$data['svp_total'] = $db->result($query, 0);
$query = $db->query("SELECT COUNT(*) FROM {$tablepre}favorites");
$data['fav_total'] = $db->result($query, 0);

require_once DISCUZ_ROOT.'./include/cache.func.php';
writetocache('parasy_stats', '', getcachevars($data));

?>